#ifndef SQLITE_H
#define SQLITE_H

#include <sqlite3.h>
#include <head.h>

#define DB_NAME "smart_home.db"   
#define TABLE_USERS "users"       

// 函数声明
sqlite3 *Sqlite3_Init_DB();        
int Sqlite3_Register_User(sqlite3 *db, const char *username, const char *password, const char *family_key); 
int Sqlite3_Login_User(sqlite3 *db, const char *username, const char *password, const char *family_key);
int Sqlites3_Delete_User(sqlite3 *db, bool is_by_id,const char *type);
int Sqlites3_Modify_User(sqlite3 *db, const char *old_username,const char *old_password,const char *new_username, const char *new_password, char *family_key);
char* Sqlites3_Query_User(sqlite3 *db, bool is_by_id, const char *info);

#endif